﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SoccerSimulator5000
{
    public class Stadium
    {
        public int seats { get; set; }
        public int ticketPrice { get; set; }
        public int facilitiesIncomePerAttendant { get; set; }
        public int totalExpencePerInc { get; set; }
        public int upgradeCost { get; set; }
        public Level level { get; set; }

        public enum Level
        {
            one = 1,
            two,
            three,
            four,
            five
        }

        public Stadium()
        {
            level = Level.one;
            seats = 5000;
            ticketPrice = 7;
            facilitiesIncomePerAttendant = 2;
            totalExpencePerInc = 10000;
            upgradeCost = 150000;

        }

        public Stadium(Level level)
        {
            if (level == Level.one)
            {
                seats = 5000;
                ticketPrice = 10;
                facilitiesIncomePerAttendant = 5;
                totalExpencePerInc = 10000;
                upgradeCost = 150000;
            }
            else if (level == Level.two)
            {
                seats = 10000;
                ticketPrice = 12;
                facilitiesIncomePerAttendant = 10;
                totalExpencePerInc = 15000;
                upgradeCost = 400000;
            }
            else if (level == Level.three)
            {
                seats = 15000;
                ticketPrice = 14;
                facilitiesIncomePerAttendant = 15;
                totalExpencePerInc = 20000;
                upgradeCost = 750000;
            }
            else if (level == Level.four)
            {
                seats = 20000;
                ticketPrice = 16;
                facilitiesIncomePerAttendant = 20;
                totalExpencePerInc = 25000;
                upgradeCost = 1000000;
            }
            else if (level == Level.five)
            {
                seats = 30000;
                ticketPrice = 18;
                facilitiesIncomePerAttendant = 25;
                totalExpencePerInc = 30000;
                upgradeCost = 0;
            }
        }

        public void UpgradeStadium( Level level )
        {
            if (level == Level.one)
            {
                this.level = Level.one;
                seats = 5000;
                ticketPrice = 7;
                facilitiesIncomePerAttendant = 2;
                totalExpencePerInc = 10000;
                upgradeCost = 150000;
            }
            else if (level == Level.two)
            {
                this.level = Level.two;
                seats = 7000;
                ticketPrice = 8;
                facilitiesIncomePerAttendant = 3;
                totalExpencePerInc = 15000;
                upgradeCost = 400000;
            }
            else if (level == Level.three)
            {
                this.level = Level.three;
                seats = 9000;
                ticketPrice = 9;
                facilitiesIncomePerAttendant = 4;
                totalExpencePerInc = 20000;
                upgradeCost = 750000;
            }
            else if (level == Level.four)
            {
                this.level = Level.four;
                seats = 11000;
                ticketPrice = 10;
                facilitiesIncomePerAttendant = 5;
                totalExpencePerInc = 25000;
                upgradeCost = 1000000;
            }
            else if (level == Level.five)
            {
                this.level = Level.five;
                seats = 13000;
                ticketPrice = 11;
                facilitiesIncomePerAttendant = 6;
                totalExpencePerInc = 30000;
                upgradeCost = 0;
            }
        }
    }
}
